#include <bits/stdc++.h>
using namespace std;
// 【题目】力扣001. 两数之和
// 【难度】简单
// 【提交】https://leetcode.cn/problems/two-sum/submissions/663172129
// 【标签】数组；哈希表
class Solution {
public:
    vector<int> twoSum(vector<int>& nums, int target) {
        int n = nums.size();
        for (int i = 0; i < n; ++i) {
            for (int j = i + 1; j < n; ++j) {
                if (nums[i] + nums[j] == target) {
                    return {i, j};
                }
            }
        }
        return {};
    }
};